class Tool{
  static String regexEmail =
      "^\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*\$";

  /// 检查是否是邮箱格式
  static bool isEmail(String input) {
    if (input == null || input.isEmpty) return false;
    return new RegExp(regexEmail).hasMatch(input);
  }

  static String getportrait(int index){
    switch(index){
      case 1:return "assets/images/common/family/father.png";break;
      case 2:return "assets/images/common/family/mather.png";break;
      case 3:return "assets/images/common/family/son.png";break;
      case 4:return "assets/images/common/family/daughter.png";break;
      case 5:return "assets/images/common/family/sister.png";break;
      case 6:return "assets/images/common/family/brother.png";break;
      case 7:return "assets/images/common/family/grandpa.png";break;
      case 8:return "assets/images/common/family/grandma.png";break;
    }
  }

  
}

void main(){
  print(Tool.getportrait(4));
}